﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Lilium.Web.Mvc
{
	/// <summary>
	/// Script descriptor interface.
	/// </summary>
	/// <remarks>
	/// Script descriptors are used to register and render client scripts and references to
	/// the client resources.
	/// </remarks>
	public interface IScriptDescriptor
	{
		IEnumerable<IScriptResourceReference> GetResourceReferences();

		void RegisterScript(AjaxHelper ajaxHelper);

		/// <summary>
		/// Renders client script.
		/// </summary>
		/// <param name="ajaxHelper"></param>
		void RenderScript(AjaxHelper ajaxHelper);

		void RenderResources(AjaxHelper ajaxHelper);
	}
}
